import libvirt

conn = libvirt.open("qemu:///system")

for id in conn.listDomainsID():
    dom = conn.lookupByID(id)
    info = dom.info()
    print('ID = {:>3}; Name = {}; Status = {}'.format(id, dom.name(), info[0]))